package com.luo.auth.exception;


public enum ExceptionCodeEnum {

	 Y000000000000(0, "成功"),
	 ERROR00000001(-1, "网络异常"),
     ERROR00000003(-1, "此账号在其他地方登陆了，请重新登陆"),
     ERROR00000005(-1, "请先登录"),
     ERROR00000004(-1, "有效期过期，请重新登陆");
	
	
    // 成员变量
    private int code;  
    private String desc;  
    // 构造方法  
    private ExceptionCodeEnum(int code, String desc) {  
        this.code = code;  
        this.desc = desc;  
    }  
    // 普通方法  
    public static String getName(int code) {  
        for (ExceptionCodeEnum c : ExceptionCodeEnum.values()) {  
            if (c.getCode() == code) {  
                return c.desc;  
            }  
        }  
        return null;  
    }  
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}

}
